var mapObjectsSpecs = {
		rock : {
			width: 49, 
			height: 36, 
			sx: 70,			//разположението на спрайта в общата картинка
			sy: 0,
			depth:1, 
			collisionCorection: [20,10,1,1]
		}, 
		tallRock: {
			width: 40, 
			height: 63, 
			sx: 69,			//разположението на спрайта в общата картинка
			sy: 60,
			depth:1, 
			collisionCorection: [15,30,1,1]
		},
		tallTree : {
			width: 70, 
			height: 113, 
			sx: 0,
			sy: 0,
			depth: 3, 
			collisionCorection: [25,80,1,1]
		},
		wideTree : {
			width: 118, 
			height: 107, 
			sx: 0,
			sy: 117,
			depth: 3, 
			collisionCorection: [25,70,40,5]
		},
		bossHouse: {
			width: 305, 
			height: 187, 
			sx: 0,
			sy: 225,
			depth: 1, 
			collisionCorection: [40,1,200,155]
		},
		redPotion : {
			width: 30, 
			height: 36, 
			sx: 148,
			sy: 0,
			depth: 3, 
			val: 10,
			collisionCorection: [20,10,0,1],
			bonusFunction: function(hero){
				if (hero.health >= hero.maxHealth){
					return false;
				}
				
				if(hero.health + this.value > hero.maxHealth){
					hero.health = hero.maxHealth
				}else{
					hero.health += this.value;
				}
				
				return true
			}
		},
		bluePotion : {
			width: 30, 
			height: 36, 
			sx: 119,
			sy: 0,
			depth: 3, 
			val: 30,
			collisionCorection: [20,10,0,1],
			bonusFunction: function(hero){
				if (hero.mana >= hero.maxMana){
					return false;
				}
				
				if(hero.mana + this.value > hero.maxMana){
					hero.mana = hero.maxMana;
				}else{
					hero.mana += this.value;
				}
				
				return true
			}
		},
		hunterItem1 : { //leather hat
			width: 32, 
			height: 24,
			sx: 69,
			sy: 36,
			depth: 3, 
			val: 5,
			collisionCorection: [20,10,0,1],
			bonusFunction: function(hero){
				if(hero.className === "hunter"){
					hero.equipArmor({id: 1, name: 'item1'});
				
					return true;
				}else {
					console.log('This item is for another class');
					return false;
				}
			}
		},
		hunterItem2 : { //shouder armor
			width: 22, 
			height: 16,
			sx: 123,
			sy: 60,
			depth: 1, 
			val: 10,
			collisionCorection: [10,8,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 2, name: 'item2'});
				return true;
				
			}
		},
		hunterItem3: { //leahter torso
			width: 22, 
			height: 24,
			sx: 123,
			sy: 78,
			depth: 1, 
			val: 20,
			collisionCorection: [10,9,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 3, name: 'item3'});
				return true;
				
			}
		},
		warriorItem1 : { //helmet
			width: 30, 
			height: 21,
			sx: 145,
			sy: 39,
			depth: 3, 
			val: 15,
			collisionCorection: [20,10,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 1, name: 'item1'});
				return true;
				
			}
		},
		warriorItem3 : { //shield
			width: 28, 
			height: 17,
			sx: 145,
			sy: 61,
			depth: 2, 
			val: 25,
			collisionCorection: [18,9,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 3, name: 'item3'});
				return true;
				
			}
		},
		warriorItem2 : { //plate armor
			width: 27, 
			height: 24,
			sx: 145,
			sy: 78,
			depth: 2, 
			val: 35,
			collisionCorection: [18,9,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 2, name: 'item2'});
				return true;
				
			} //red: -38, 0, 100;   blue: -174, 0, 100; green: 122, 0, 100
		},
		mageItem1 : { //helmet
			width: 29, 
			height: 28,
			sx: 124,
			sy: 102,
			depth: 3, 
			val: 2,
			collisionCorection: [20,13,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 1, name: 'item1'});
				hero.maxMana = Math.floor(hero.maxMana*1.2);
				hero.maxHealth = Math.floor(hero.maxHealth*1.2);
				return true;
				
			}
		},
		mageItem2 : { //helmet
			width: 29, 
			height: 28,
			sx: 153,
			sy: 102,
			depth: 3, 
			val: 2,
			collisionCorection: [20,13,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 2, name: 'item2'});
				hero.maxMana = Math.floor(hero.maxMana*1.4);
				return true;
				
			}
		},
		mageItem3 : { //helmet
			width: 29, 
			height: 28,
			sx: 182,
			sy: 102,
			depth: 3, 
			val: 2,
			collisionCorection: [20,13,0,1],
			bonusFunction: function(hero){
				hero.equipArmor({id: 3, name: 'item3'});
				hero.maxHealth = Math.floor(hero.maxHealth*1.4);
				hero.speed +=1;
				return true;
				
			}
		},
		scull : {
			width: 26, 
			height: 26, 
			sx: 341,
			sy: 67,
			depth: 3, 
			val: 1,
			collisionCorection: [16,6,0,1],
			bonusFunction: function(hero){
				hero.questItems[1]++
				return true;
			}
		},
		mushroom : {
			width: 24, 
			height: 25, 
			sx: 118,
			sy: 36,
			depth: 1, 
			val: 0,
			collisionCorection: [10,5,0,1],
			bonusFunction: function(hero){
				if(hero.takenQuests[0]){
					hero.questItems[0]++;
					return true;
				}else{
					return false;
				}
				
			}
		},
		key: {
			width: 34, 
			height: 34, 
			sx: 180,
			sy: 0,
			depth: 3, 
			val: 0,
			collisionCorection: [20,10,0,1],
			bonusFunction: function(hero){
				return true
			}
		}
}
